<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            /* width: 400px; */
            /* height: 500px; */
            /* height: auto; */
            /* background-color: palevioletred; */
        }
        
        .box1 {
            width: 500px;
            height: 500px;
            background-color: palevioletred;
        }
        
        .box2 {
            width: 400px;
            /* height: 400px; */
            /* height: 50%; */
            background-color: peru;
            max-height: 500px;
            overflow-y: auto;
            min-height: 200px;
        }
    </style>
</head>

<body>
    <div class="box1">
        <div class="box2">
            Lorem ipsum dolor sit amet consectetur, adipisicing elit. Delectus ut
        </div>
    </div>

</body>

</html>